/*
 * Copyright 2011 Digia Oyj - Pasi Hirvonen <pasi.hirvonen@digia.fi>
 */

#ifndef TRACRPCCONNECTION_P_H
#define TRACRPCCONNECTION_P_H

/*
    Not part of the public API. May change at any time without any notice whatsoever.
*/

#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QUrl>

class QNetworkAccessManager;
class QString;
class QNetworkReply;
class XmlRpcResponse;
class XmlRpcConnection;

namespace XmlRpc {

class XmlRpcConnectionPrivate : public QObject {
    Q_OBJECT
public:
    XmlRpcConnectionPrivate(XmlRpcConnection *con);
    ~XmlRpcConnectionPrivate();

    void sendRequest(const QString &request, XmlRpcResponse *response, bool anonymous = false);

    QNetworkAccessManager *manager;
    QUrl url;
    QMap<QNetworkReply *, XmlRpcResponse *> requests;
    XmlRpcConnection *q;
private slots:
    void finished(QNetworkReply *reply);
};

} // namespace XmlRpc

#endif // TRACRPCCONNECTION_P_H
